from rest_framework import viewsets
from rest_framework.decorators import api_view
from .models import Goods, GoodsType
from .serializers import GoodsSerializer, GoodsTypeSerializer
# Create your views here.


class GoodsViewSet(viewsets.ModelViewSet):
    queryset = Goods.objects.all()
    serializer_class = GoodsSerializer


class GoodsTypeViewSet(viewsets.ModelViewSet):
    queryset = GoodsType.objects.all()
    serializer_class = GoodsTypeSerializer